<template>
    <div class="x_body">
        <div class="body_size">
            <div class="x_left" style="color: white;">
                <div class="x_com_info_title">济南万新医学科技有限公司</div>
                <div class="x_com_info_body">
                    <div>电话: 15866771101</div>
                    <div>地址: 山东省济南市槐荫区银座中心2号楼2307</div>
                </div>
            </div>

            <div class="x_img_size">
                <img src="images/qrCode.jpg" alt="">
            </div>

            <div class="x_right">
                <ul class="x_nav">
                    <li @click="x_click_skip(1)">认识万新</li>
                    <li @click="x_click_skip(2)">医学资讯</li>
                    <li @click="x_click_skip(3)">临床招募</li>
                    <li @click="x_click_skip(4)">加入我们</li>
                </ul>
                <ul class="x_nav2">
                    <li>© 版权所有 2023</li>
                    <li @click="privacy">万新医学隐私政策</li>
                    <li>版权备案号</li>
                </ul>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'xFooter',

    data() {
        return {

        };
    },

    mounted() {
    },
    methods: {
        privacy() {
            if (this.$route.name != 'privacy') {
                this.$router.push({ name: "privacy" })
                window.scrollTo(0,440)
            }
        },
        x_click_skip(index) {
            console.log(index);
            console.log(this.$route.name);
              // 获取点击导航对应的路由名称
            let targetRouteName = '';
            if (index === 1) {
                targetRouteName = 'home';
            } else if (index === 2) {
                targetRouteName = 'information';
            } else if (index === 3) {
                targetRouteName = 'recruit';
            } else if (index === 4) {
                targetRouteName = 'join';
            }

             // 判断是否当前导航与点击导航相同
            if (this.$route.name === targetRouteName) {
                // 如果是当前页面，则不执行路由跳转
                console.log('当前导航已经是当前页面，不执行路由跳转');
            } else {
                // 如果不是当前页面，则执行路由跳转
                this.$router.push({ name: targetRouteName });
            }
        }
    },
};
</script>

<style scoped>
.x_body {
    width: 100%;
    height: auto;
    background-color: #5babff;
    color: #333333;
    /* position: fixed; */
    /* bottom: 0; */
}
.body_size{
    width: 75rem;
    height: auto;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    padding: 1.25rem 0;
    color: white !important;
}

.x_left{
    width: 27%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.x_com_info_title{
    font-weight: bold;
    font-size: 1.2rem;
}
.x_com_info_body div{
    font-size: 0.9rem;
}

.x_img_size{
    width: 6.25rem;
    height: 6.25rem;
}
.x_img_size img{
    width: 6.25rem;
    height: 6.25rem;
}

.x_right{
    width: 30%;
    height: auto;
    margin-left: 3.125rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.x_right ul{
    list-style: none;
    display: flex;
}
.x_right ul li{
    margin: 0 0.9375rem;
    cursor: pointer;
    /* 动画效果 */
    transition: color 0.3s;
}
.x_right ul li:hover{
    color: #838383;
}
.x_nav{
    font-weight: bold;
}
.x_nav li{
    font-size: 0.9rem;
}
.x_nav2{
    border-top: 0.0625rem solid #ffffff3c;
    padding-top: 0.625rem;
}
.x_nav2 li{
    font-size: 0.8rem;
}
</style>